- if @project.pages_deployed?
  = render ::Layouts::CrudComponent.new(s_('GitLabPages|Delete Pages'),
    body_options: { class: '!gl-m-0 gl-p-5 gl-bg-feedback-danger' }) do |c|
    - c.with_body do
      - if can?(current_user, :remove_pages, @project)
        %p
          = s_('GitLabPages|This action will permanently delete all Pages deployments.')
          = s_('GitLabPages|This is permanent and cannot be undone. To deploy this Pages site again, run a new pipeline.')
        = render Pajamas::ButtonComponent.new(href: project_pages_path(@project),
          variant: :danger,
          method: :delete,
          button_options: { data: { confirm: s_('GitLabPages|Are you sure?'), 'confirm-btn-variant': 'danger' }, "aria-label": s_('GitLabPages|Remove pages') }) do
          = s_('GitLabPages|Delete Pages')
      - else
        = s_('GitLabPages|Only project maintainers can remove pages.')
